/**
 * User: 蕨菜
 * Date: 2019-05-15
 * Time: 09:54
 * Description: 此文件简要说明
 */


module.exports = function (sequelize, dataTypes) {

    return sequelize.define('teacher', {
        id: {
            type: dataTypes.BIGINT(11),
            allowNull: false,
            primaryKey: true,
            autoIncrement: true,
            unique: true,
            comment: '用户id',
        },
        name: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '老师名字'
        },
        sex: {
            type: dataTypes.ENUM,
            values: ['0', '1'],
            allowNull: false,
            comment: '性别 0表示女生 1 表示男生'
        },
        phone: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '手机号码'
        },
        office: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '办公室地址'
        },
        address: {
            type: dataTypes.STRING,
            allowNull: false,
            comment: '家庭住址'
        },
        active: {
            type: dataTypes.BOOLEAN,
            allowNull: false,
            comment: '是否处于激活状态'
        }
    })
}
 